#ifndef WIN_SETTING_H
#define WIN_SETTING_H

#include <wx/wx.h>
#include <wx/dialog.h>
#include <wx/treectrl.h>
#include <wx/notebook.h>
#include <wx/simplebook.h>
#include <wx/stattext.h>
#include <wx/treebook.h>
#include <wx/gbsizer.h>
#include <wx/event.h>
#include <wx/choicebk.h>

#include "portaudio.h"

#ifdef WIN32

#include <windows.h>

#if PA_USE_ASIO
#include "pa_asio.h"
#endif

#endif

#include "portaudio.h"

#ifdef WIN32

#include <windows.h>

#if PA_USE_ASIO
#include "pa_asio.h"
#endif

#endif

class Win_Setting : public wxDialog
{
public:
    Win_Setting(wxWindow *parent,
            wxWindowID id,
            const wxString& title);

private:
    typedef struct _pa_device_choice
    {
        wxChoice* in_dev_choice;
        wxChoice* in_rate_choice;
        wxChoice* in_bit_choice;
        wxChoice* out_dev_choice;
        wxChoice* out_rate_choice;
        wxChoice* out_bit_choice;
    }pa_device_choice;

    std::vector<pa_device_choice> audio_device_choice;

    wxPanel* audioPanel;
    wxPanel* displayPanel;
    wxPanel* networkPanel;
    wxChoicebook *audioDevicetype;
    PaDeviceIndex inputDeviceIndex;
    PaDeviceIndex outputDeviceIndex;
    PaHostApiTypeId hostApiType;


    wxPanel* Win_Setting::CreateAudioPanel(wxWindow* parent);
    wxPanel* Win_Setting::CreateDisplayPanel(wxWindow* parent);
    wxPanel* Win_Setting::CreateNetworkPanel(wxWindow* parent);

    void OnChoiceChangedAudioSystem(wxCommandEvent& event);
    void OnChoiceChangedAudioDevice(wxCommandEvent& event);
    // wxDECLARE_EVENT_TABLE();
};

#endif // WIN_AUDIOWRITE_H